/*
 * TemperaturePlot.hpp
 *
 * Copyright 2012 Pieter Agten
 *
 * This file is part of tltgen.
 *
 * tltgen is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * tltgen is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with tltgen.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * @file   TemperaturePlot.hpp
 * @author Pieter Agten (pieter.agten@gmail.com)
 * @date   25 jan 2013
 */

#ifndef TEMPERATUREPLOT_HPP
#define TEMPERATUREPLOT_HPP

#include <boost/shared_ptr.hpp>

#include "ThermistorTablePlot.hpp"

using boost::shared_ptr;

namespace tltgen {

  class TemperatureScale;
  class TemperaturePlot : public ThermistorTablePlot {
  public:
    TemperaturePlot(const shared_ptr<ThermistorTable>& thermistorTable, const shared_ptr<LeastSquaresSolver>& solver, const shared_ptr<TemperatureScale const>& temperatureScale);
    virtual ~TemperaturePlot();

    static bool isValidTemperatureScale(const shared_ptr<TemperatureScale const>& temperatureScale);

    virtual void setTemperatureScale(const shared_ptr<TemperatureScale const>& temperatureScale);
    virtual shared_ptr<TemperatureScale const> getTemperatureScale() const;

    unsigned int getXMaxDigits() const;
    std::string getXLabel() const;
    tuple<PLFLT, PLFLT> getXBoundsAuto() const;
    PLFLT getXValue(ThermistorTableRow* thermistorTableRow) const;

  protected:
    shared_ptr<TemperatureScale const> temperatureScale;
  };

}

#endif
